<?php
header('Content-type: text/plain');
header('Content-Disposition: attachment; filename="dhcpd.conf"');
echo "#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample  
#
ddns-update-style interim;
ignore client-updates;

subnet 192.168.2.0 netmask 255.255.255.0 {
	
	range 192.168.2.160 192.168.2.223;
	option routers	192.168.2.228;
        option subnet-mask 255.255.255.0;
	option domain-name-servers 192.168.2.228;
	default-lease-time 86400;
        max-lease-time 691200;\r\n\r\n";
		
foreach($query as $row){
	echo "	host	".$row['host']."	{ hardware ethernet	".$row['mac']."	; fixed-address	".$row['ip']."	; }\r\n";
}
echo "}";
?>